home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
EDUCATE
/
PEDHLP13.ARJ
/
ALGORITH
< prev
next >
Wrap
Text File
|
1990-03-27
|
4KB
|
81 lines
■ EXPLANATION OF MAPPING ALGORITHM
This is provided so that the optimum order for including people
in the data file can be decided upon. The aim would be to reduce
the number of crossings over of lines, and to avoid having to
repeat individuals in different parts of the diagram.
In general people are added to the pedigree diagram in order
from top to bottom and from left to right. The algorithm used is
as follows:
1. An individual whose descendants are to be displayed is
selected by the user.
2. If the option to extend the pedigree and show all members
is selected then instead of starting with the individual given
the program attempts to begin with the oldest ancestor of this
individual it can find.
3. The following process is repeated (recursively) for each
individual in turn, beginning with the common ancestor provided.
A. The index individual is marked as "dealt with", and is drawn.
B. The next spouse of the index individual is selected. The next
spouse is the one who has a child which appears in the data
file before the children of other spouses, provided that the
spouse is not marked as "dealt with".
C. Each of the children of the index individual and this spouse
is in turn selected. If the child has already been drawn then a
line will be drawn from the current sibship to the place where
the child appears in the pedigree, unless the child has been
shown in an earlier generation (when the line would have to go
"uphill"), in which case the child is drawn again but is marked
as a repeat ("REP"). If the child is not marked as "dealt with"
it is set as the new index individual and the process beginning
in 3A is applied to it (i.e. it's spouses and children will be
displayed).
D. If the option to extend the pedigree and show all members
is selected then the oldest ancestor of the spouse is added to a
"to-be-done-later" list.
E. The spouse is set to be the new index individual and the
process beginning in 3A is applied to it.
4. If the option to extend the pedigree and show all members is
selected then for everyone in the "to-be-done-later" list the
process beginning in 3A is applied.
<CONFIGUR -AFLAG>
The above algorithm actually works quite well, even for fairly
complex pedigrees. However it does fall down if there is a
complete marriage loop, as when a husband has children by his
ex-wife's ex-husband's ex-wife. If H1 has children by W1 and
W1 has children by H2 and H2 has children by W2, then if W2 has
children by H1 the program will not display them (or the
marriage between H1 and W2) because H1 will already be marked as
"dealt with" by the time the circle comes round to him again. A
similar thing would happen if a man had children by his ex-
wife's ex-husband's daughter. In practice this should rarely be
a problem and I have no intention of fixing it at present. You
will have to work round it by creating a dummy individual to
break the loop.
To avoid having unnecessary repeated individuals, make sure that
the ancestor belonging to the earliest generation is given
first. Note that to force a sibship of a given parent to be
shown first it is only necessary to promote one of the sibs in
it to be first in the data file. However to force a sibship to
be last all the sibs must come after all the other children of
that parent. <ADJUST -Promoting>
I don't know whether to recommend that the easiest way to get
the best-looking pedigree is to try to understand the algorithm
or just use trial and error. In my experience it is almost
always possible to get whole the pedigree displayed without any
repeats. <ALGORITH -"REP">